<!-- 我的工具 -->
<div id="kaMySmallTool" class="kaultra-container" style="width: 1280px;margin: 0 auto;"></div>
<script>
    layui.use(top.layuiuse, function () {
        var $ = layui.jquery;
        var kaAjax = layui.kaAjax;
        var kahtml = layui.kahtml;
        var kaBgUrl = layui.kaBgUrl;
        var table = layui.table;
        var registerIds = ["kaMySmallTool", "kaMySmallToolTop", "kaMySmallToolTopLeft", "kaMySmallToolRight", "kaMySmallToolTopLeft1", "kaMySmallToolTopRight1", "kaMySmallToolTopRight11", "kaMySmallTool2", "kaMySmallTool3"];
        // var kaAjaxFormData = {};
        // kaAjax.ajax(kaBgUrl.url("getKaMySmallToolData"), function (rs) {
        //     if (rs.code == 200) {
        //         top.currentUser = rs.data;
        //         $("#topUsername").html(top.currentUser.nickName);
        //         $("#usermenuurl_usernameImg").attr("src", top.currentUser.avatar);
        //     }
        // }, kaAjaxFormData);
        var registerkey = kaRegisterPrimaryKey.registerId(registerIds);
        if (registerkey.judge) {
            var kahtml = layui.kahtml;
            // 表格分栅格
            gridHtmlData = {
                id: registerkey.ids[0],
                colSpace: 20, // Grid 间隔
                list: [{
                    id: registerkey.ids[1],
                    colXs: 12
                }, {
                    id: registerkey.ids[7],
                    colXs: 12
                }, {
                    id: registerkey.ids[8],
                    colXs: 12
                }] // 循环数据
            }
            kahtml.getTemplateHtml("grid", gridHtmlData);
            // 表格分栅格
            gridHtmlData1 = {
                id: registerkey.ids[1],
                colSpace: 20, // Grid 间隔
                list: [{
                    id: registerkey.ids[2],
                    colXs: 7,
                    style: "height: 360px;padding-bottom: 0px;"
                }, {
                    id: registerkey.ids[3],
                    colXs: 5,
                    style: "padding-bottom: 0px;"
                }] // 循环数据
            }
            kahtml.getTemplateHtml("grid", gridHtmlData1);
            // 轮播图
            carouselHtmlData2 = {
                id: registerkey.ids[2],
                list: [{
                    id: registerkey.ids[4],
                    list: [{
                        id: registerkey.ids[4] + "_img_1",
                        url: "admin/images/hlzy2.png"
                    }, {
                        id: registerkey.ids[4] + "_img_1",
                        url: "admin/images/hlzy.png"
                    }]
                }] // 循环数据
            }
            kahtml.getTemplateHtml("carousel", carouselHtmlData2);
            // 表格分栅格
            gridHtmlData3 = {
                id: registerkey.ids[3],
                colSpace: 20, // Grid 间隔
                list: [{
                    id: registerkey.ids[5],
                    colXs: 12
                }] // 循环数据
            }
            kahtml.getTemplateHtml("grid", gridHtmlData3);
            // 面板1
            panelHtmlData5 = {
                id: registerkey.ids[5],
                list: [{
                    id: registerkey.ids[6],
                    style: ""
                }]
            }
            kahtml.getTemplateHtml("panel", panelHtmlData5);
            // 渲染 - 图片轮播
            layui.carousel.render({
                elem: '#' + registerkey.ids[4],
                width: '100%',
                height: "100%",
                interval: 3000
            });
            // 表格
            $("#" + registerkey.ids[6]).html(layui.kaHtmlStatic.v4());
            // 面板1
            $("#" + registerkey.ids[7]).html(layui.kaHtmlStatic.v41());
            // 面板1
            $("#" + registerkey.ids[8]).html(layui.kaHtmlStatic.v42());
        }
    })
</script>